﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


class QuadraticEquation
{
    static void Main(string[] args)
    {
        Console.Write("Enter a = ");
        int a = Convert.ToInt32(Console.ReadLine());
        Console.Write("Enter b = ");
        int b = Convert.ToInt32(Console.ReadLine());
        Console.Write("Enter c = ");
        int c = Convert.ToInt32(Console.ReadLine());
        int discriminant = (b * b) - 4 * a * c;
        double root1 = 0;
        double root2 = 0;
        Console.WriteLine("Discriminant D = {0}", discriminant);
        if (discriminant < 0) 
        {
            Console.WriteLine("No real roots");
        }
        else if (discriminant == 0)
        {
            root1 = (-1 * (b / (2 * a)));
            Console.WriteLine("One real root - {0,10:F4}", root1);
        }
        else 
        {
            b = b*-1;
            root1 = ((b + Math.Sqrt(discriminant)) / 2 * a);
            root2 = ((b - Math.Sqrt(discriminant)) / 2 * a);
            Console.WriteLine("Root 1 {0,10:F4}\nRoot 2 {1,10:F4}", root1, root2);
        }
    }
}
